{% extends "base.html" %}

{% block content %}
<div class="row justify-content-center mt-5">
    <div class="col-lg-5">
        <div class="card fade-in">
            <div class="card-header py-3">
                <h4 class="m-0 font-weight-bold text-center"><i class="bi bi-person-plus me-2"></i>用户注册</h4>
            </div>
            <div class="card-body p-4">
                <form method="POST" action="{{ url_for('auth.register') }}">
                    <div class="mb-3">
                        <label for="username" class="form-label">用户名</label>
                        <div class="input-group">
                            <span class="input-group-text"><i class="bi bi-person"></i></span>
                            <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" required>
                        </div>
                    </div>
                    <div class="mb-3">
                        <label for="email" class="form-label">电子邮箱</label>
                        <div class="input-group">
                            <span class="input-group-text"><i class="bi bi-envelope"></i></span>
                            <input type="email" class="form-control" id="email" name="email" placeholder="请输入电子邮箱" required>
                        </div>
                    </div>
                    <div class="mb-4">
                        <label for="password" class="form-label">密码</label>
                        <div class="input-group">
                            <span class="input-group-text"><i class="bi bi-lock"></i></span>
                            <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required>
                        </div>
                    </div>
                    <div class="d-grid mb-3">
                        <button type="submit" class="btn btn-primary btn-block py-2">
                            <i class="bi bi-person-plus me-2"></i>注册
                        </button>
                    </div>
                    <div class="text-center">
                        <a href="{{ url_for('auth.login') }}" class="text-decoration-none">已有账号？立即登录</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}